/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.mycompany.sislic.repository.hibernate;

import com.mycompany.sislic.repository.SolicitudRepository;
import java.util.List;

import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
import org.springframework.stereotype.Repository;

/**
 *
 * @author Caleb
 */
@Repository
public class SolicitudRepositoryHibernate extends HibernateDaoSupport implements SolicitudRepository {
    @Autowired
    public SolicitudRepositoryHibernate(SessionFactory sessionFactory) {
		setSessionFactory(sessionFactory);
	}

   @Override
    public List ObtenerSolicitud() {
        StringBuffer query = new StringBuffer("from TSolicitud");
        List<SolicitudRepository> list = getHibernateTemplate().find(query.toString());
		return list;
       // throw new UnsupportedOperationException("Not supported yet.");
    }
}
